package dao.impl;

import entity.Phone;
import util.JdbcUtil;

import java.sql.SQLException;
import java.util.List;

public class PhoneDaoImpl {
    public List<Phone> selectAllPhone() throws SQLException {
        return JdbcUtil.executeQuery(Phone.class,"select * from t_phone");
    }

    public void deletePhoneById(int id) throws SQLException {
        JdbcUtil.executeUpdate("delete from t_phone where id =?",id);
    }
}
